export default {
    namespaced: true,
    state: {
        obj: {},
        lampsx: {},
    },
    mutations: {
        list(state, res) {
            state.obj = res.data.data
            state.lampsx = res.data.data
        },
    },
    getters: {
        asd1(state) {
            return state.obj
        },
    },
    actions: {
        saveForm(context, prams) {
            axios.get(`sensorGroup/list`, {
                params: {
                    userId: sessionStorage.getItem("id")
                }
            }).then(res => {
                context.commit('list', res)
            }).catch(err => {
                console.log(err);
            })
        }
    }
}